import java.io.Serializable;
import java.util.Comparator;


public class Lugar implements Comparable<Lugar>, Serializable{
	public static final int STATE_FREE = 0;
	public static final int STATE_RESERVED = 1;
	public static final int STATE_BOUGHT = 2;
	int id;
	int row;
	int column;
	int state;
	
	public static final Comparator<Lugar> DESCENDING_COMPARATOR = new Comparator<Lugar>() {
		public int compare(Lugar o1, Lugar o2){
			return o1.id - o2.id;
		}
	};
	
	public Lugar(int id, int row, int column, int state){
		this.id = id;
		this.row = row;
		this.column = column;
		this.state = state;
	}

	@Override
	public int compareTo(Lugar o) {
		return Integer.toString(this.id).compareTo(Integer.toString(o.id));
	}
}
